package com.cn.provide;

import com.alibaba.dubbo.config.annotation.Service;
import com.cn.service.CostService;
import org.springframework.stereotype.Component;

/**
 * @Author jiangwang
 * @Created by 2020/9/5 14:13
 * @Description: TODO
 */
@Service
@Component
public class CostServiceImpl implements CostService
{
    /**
     * 假设之前总花费了100
     */
    private final Integer totalCost = 1000;


    @Override
    public Integer add(int cost)
    {
        return totalCost + cost;
    }
}
